package designpatterns.observer;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author LiDong
 * @version 1.0.0
 * @createTime 2022/2/10 8:36
 */
public class ObserverTwo extends Observer{

    private static final Logger logger = LoggerFactory.getLogger(ObserverTwo.class);

    public ObserverTwo(Subject subject) {
        this.subject = subject;
        this.subject.registerObserver(this);
    }

    @Override
    public void update() {
        logger.info("ObserverTwo 收到通知！");
    }
}
